<!-- 申请加入 -->
<style>
	th {
		text-align: center;
	}
	
	.table>tbody>tr>td {
		line-height: 60px;
		text-align: center;
		height: 50px;
		margin: 0px;
	}
</style>
<div id="data_page" class="in_page">
	<!--
		<div class="panel panel-default">
			<div class="panel-body">
				<form class="form-inline" method="get" name="keyword" id="keyword">
					<div class="form-group">
						<input type="text" class="form-control" id="exampleInputName2" name="key" placeholder="姓名">
					</div>
					 <button type="submit" class="btn btn-sm btn-default">搜索</button>
				</form>
			</div>
		</div>-->
		
	<table class="table table-striped table-bordered table-condensed  ">
		<thead>
			<tr>
				<th>姓名</th>
				<th>电话</th>
				<th>地址</th>
				<th>资金状况</th>
				<th>申请时间</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			<volist name="list" id="li">
				<tr>
					<td>{$li.name}</td>
					<td >{$li.phone}</td>
					<td>{$li.adress}</td>
					<td>{$li.money}</td>
					<td><?php echo date('Y-m-d H:i:s',$li['ctime'])?></td>

					<td style="text-align:center">
						<if condition="$li.status eq 1">
						 <button type="button" class="btn btn-sm btn-success" id="join" d_id="{$li.id}" >确认加盟</button>
						 <else />
						 <button type="button" class="btn btn-sm btn-warning" >已加盟</button>
						 </if>
					</td>
				</tr>
			</volist>
		</tbody>
	</table>
</div>
<div>{$page}</div>
<script>
	$(function(){
		$('#join').click(function(){
			var url = "{:U('Join/apply')}?status=2&id="+$(this).attr("d_id");
			$.get(url,function(obj){
				if(obj.s){
					alert(obj.m);
					location.reload();
				}
			})
		})
	})
</script>